<?php
	echo doctype('html5');
?>

<html>
	
	
	
	
<head>

	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title><?php echo $template['title'];?></title>

	<meta name="description" 	content="" />
	<meta name="author" 		content="" />

	<?php 
		// load group libraries
		foreach ($groupLibraries as $lib) {
			$this->carabiner->display($lib);
		}	
		
		// this group is always loaded 
		$this->carabiner->display('YUI2_RESET');
		
		// display other assets
		$this->carabiner->display();
	?>
	
	
	
<script type="application/javascript">

	$(document).ready(function() {
		$('#loginForm input.buttonLogin').click(function() {
			//alert($('#loginForm input.username').val());
			//console.log($('#loginForm input.username').val());
			//login();
		});
	});
	
	
	function login() {
		var form_data = {
			username : 	$('#loginForm input.username').val(),
			password : 	$('#loginForm input.password').val(),
			ajax : 		'1'
		};
	
		$.ajax({
			url: 		"<?php echo base_url('pt/Main/login'); ?>",
			type: 		'POST',
			async : 	false,
			data: 		form_data,
	
			success: 	function(msg) {
				//$('#message').html(msg);
				window.location.href = "<?php echo base_url()."pt/Admin/index";?>";
				alert(msg);
			},
	
			error:		function(jqXHR, textStatus, errorThrown) {	
				
			},
			
			complete: function(xhr, status) {
				
			}
		});
	}

</script>

</head>








<body>

	<div id="topPan">
	
		<p><?php echo $template['title'];?></p>
	
		<div id="topChangeLanguagePan">
			<a href="<?php echo  base_url()."en/Main";?>" title="ingles">
				<img alt="EN" src="<?php echo  base_url()."assets/img/flags/en.png"?>" />
			</a>
			
			<a href="<?php echo  base_url()."pt/Main";?>" title="portugues">
				<img alt="PT" src="<?php echo  base_url()."assets/img/flags/pt.png"?>" alt="portugues" />
			</a>
			
			<a href="<?php echo  base_url();?>" title="espanhol">
				<img alt="ES" src="<?php echo  base_url()."assets/img/flags/es.png"?>" alt="espanhol" />
			</a>
		</div>
		
		<div id="topMenuPan">
				<!--  <div id="topMenuLeftPan"></div> -->
				<div id="topMenuMiddlePan">
				
					<?php 
						echo $menus['main'];	
					?>
					
				</div>
				<div id="topMenuRightPan"></div> 
		</div>
		
	</div>
	
	
	<div id="bodyPan">
	
		<?php 
		
			// load main content
			echo $template['body'];
	
			// load right panel
			echo $template['partials']['rightPanel'];
			
		?>
		
	</div>
	
	<?php 
		// load footer partial
		echo $template['partials']['footer'];
	?>

</body>



</html>

